<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style>
           #main
           {
               width:960px;
           }
           table
           {
               border-collapse: collapse;
           }
           #tabletop
           {
               width:100%;
           }
           #tableleft
           {
               width: 240px;
               float: left;
           }
           #main-table
           {
              
               
           }
           #tabletop  tr td
           {
               width: 120px;
               background:#006600;
               border: 1px solid #000;
               color: #FFF;
               text-align: center;
               padding: 0;
           }
           #tableleft tr td{
               width: 120px;
               height: 25px;
               border: 1px solid #000;
               text-align: center;
               padding: 0;
           }
           #main-table tr td
           {
               width: 120px;
               height: 75px;
               border: 1px solid #000;
               text-align: center;
               padding: 1px 0px 1px 0px;
           }
        </style>
    </head>
    <body>
    <div id="main">    
        <div id="tabletop">
            <table>
                <tr>
                    <td>&nbsp;</td>
                    <td>Tiết</td>
                    <td>Thứ 2</td>
                    <td>Thứ 3</td>
                    <td>Thứ 4</td>
                    <td>Thứ 5</td>
                    <td>Thứ 6</td>
                    <td>Thứ 7</td>
                </tr>
            </table>
        </div>
        <div id="tableleft">
            <table>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                </tr>
                
            </table>
        </div>
        <div id="main-table">
        <?php
       $ds = array (
            array("HTTT PVu TTKD", 62, "C32", 2, 7, 9),
            array("ĐLCMDCS","", "",3, 7,9),
            array("ATBMCSDL", 91, "C33",4,4, 6),
            array("HQTCSDL", 110,"C43",6, 4, 6),
            array("UDPTan", 75, "C31",6, 10, 12)
            );
       ?>
        <table>
        <?php
        for ($row = 0; $row <  4; $row++) 
        {
        
            echo "<tr>";
            for ($col = 0; $col <  6; $col++) 
            {
            
                $tdvalue=array("","","","","","");
                foreach ($ds as $note)
                {
                    if($note[3]==$col+2)
                    {
                        if(($note[4]==1&&$row==0)||($note[4]==4&&$row==1)||($note[4]==7&&$row==2)||($note[4]==10&&$row==3))
                        {
                            $tdvalue=$note;
                        }
                        
                    }
                    
                }
                echo "<td>".$tdvalue[0]."</br>".$tdvalue[1]."</br>".$tdvalue[2]."</td>";
            
            }
            echo "</tr>";
        } ?>
        </table>
        </div>
    </div>        
    </body>
</html>
